// IDEA风格的颜色变量 - 浅色主题
:root {
  // 主题背景色
  --bg-primary: #ffffff;
  --bg-secondary: #f3f3f3;
  --bg-tertiary: #e8e8e8;
  
  // 文本颜色
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-disabled: #999999;
  
  // 边框和分割线
  --border-color: #d0d0d0;
  --separator-color: #e0e0e0;
  
  // 高亮和选中
  --highlight: #0078d4;
  --hover: #f0f0f0;
  --selected: #e1f5fe;
  --primary-color-hover: rgba(0, 120, 212, 0.1);
  
  // 状态颜色
  --success: #107c10;
  --warning: #ff8c00;
  --error: #d13438;
  --info: #0078d4;
  
  // 编辑器特定颜色
  --ide-bg-color: #ffffff;
  --ide-text-color: #333333;
  --ide-toolbar-bg: #f3f3f3;
  --ide-border-color: #e0e0e0;
  --ide-gutter-bg: #f8f8f8;
  --ide-line-number-color: #858585;
  --ide-active-line-gutter-bg: #ececec;
  --ide-active-line-bg: #f6f6f6;
  --ide-cursor-color: #333333;
  --ide-selection-bg: #add6ff;
}

// 滚动条样式
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #f3f3f3;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

// 选择文本样式
::selection {
  background-color: var(--highlight);
  color: white;
}

.idea-header {
  display: flex;
  align-items: center;
  height: 32px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--separator-color);
  padding: 0 8px;
}

.idea-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.idea-sidebar {
  width: 48px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--separator-color);
  overflow-y: auto;
}

.idea-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.idea-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 24px;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--separator-color);
  padding: 0 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

// IDEA风格的按钮
.idea-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 0;
  transition: background-color 0.2s;
}

.idea-button:hover {
  background-color: var(--hover);
}

// IDEA风格的菜单项
.idea-menu-item {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 8px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.2s;
}

.idea-menu-item:hover {
  background-color: var(--hover);
}

.idea-menu-item.active {
  background-color: var(--selected);
}

// IDEA风格的输入框
.idea-input {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 0;
  padding: 4px 8px;
  font-size: 12px;
  outline: none;
}

.idea-input:focus {
  border-color: var(--highlight);
}

// IDEA风格的工具栏
.idea-toolbar {
  display: flex;
  align-items: center;
  height: 32px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--separator-color);
  padding: 0 8px;
}

.idea-toolbar-section {
  display: flex;
  align-items: center;
  gap: 4px;
}

// IDEA风格的选择器
.idea-select {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 0;
  padding: 2px 6px;
  font-size: 12px;
  height: 24px;
  outline: none;
}

// IDEA风格的卡片
.idea-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--separator-color);
  border-radius: 0;
  padding: 12px;
}

// IDEA风格的分割线
.idea-divider {
  height: 1px;
  background-color: var(--separator-color);
  margin: 4px 0;
}

// IDEA风格的三栏布局
.idea-three-column-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  background-color: var(--bg-primary);
}

// 左侧固定侧边栏
.idea-left-sidebar {
  width: 48px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--separator-color);
  overflow-y: auto;
  flex-shrink: 0;
  /* 移除 z-index: 10; */
}

.idea-sidebar-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  margin: 2px 4px;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.2s;
  position: relative;
}

.idea-sidebar-item:hover {
  background-color: var(--hover);
}

.idea-sidebar-item.active {
  background-color: var(--selected);
  color: var(--highlight);
}

.idea-sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--highlight);
  border-radius: 0 3px 3px 0;
}

// 中间导航区域
.idea-navigation {
  width: 240px;
  background-color: var(--bg-primary);
  border-right: 1px solid var(--separator-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}

.idea-navigation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 24px;
  padding: 0 8px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--separator-color);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.idea-navigation-content {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.idea-navigation-item {
  display: flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  margin: 0 4px;
  border-radius: 3px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.idea-navigation-item:hover {
  background-color: var(--hover);
}

.idea-navigation-item.active {
  background-color: var(--selected);
  color: var(--highlight);
}

.idea-navigation-item-icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.idea-navigation-item-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

// IDEA风格的树形结构
.idea-tree {
  padding: 4px 0;
}

.idea-tree-node {
  user-select: none;
}

.idea-tree-node-content {
  display: flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  margin: 0 4px;
  border-radius: 3px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.idea-tree-node-content:hover {
  background-color: var(--hover);
}

.idea-tree-node-content.active {
  background-color: var(--selected);
  color: var(--highlight);
}

.idea-tree-node-expand {
  width: 16px;
  height: 16px;
  margin-right: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.idea-tree-node-icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.idea-tree-node-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.idea-tree-node-children {
  padding-left: 16px;
}

// 右侧编辑区域
.idea-editor {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
  overflow: hidden;
}

.idea-editor-tabs {
  display: flex;
  height: 32px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--separator-color);
  overflow-x: auto;
  flex-shrink: 0;
}

.idea-editor-tab {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 12px;
  background-color: var(--bg-primary);
  border-right: 1px solid var(--separator-color);
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.idea-editor-tab:hover {
  background-color: var(--hover);
}

.idea-editor-tab.active {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.idea-editor-tab-close {
  width: 16px;
  height: 16px;
  margin-left: 8px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.idea-editor-tab-close:hover {
  background-color: var(--bg-tertiary);
}

.idea-editor-content {
  flex: 1;
  overflow: auto;
  padding: 8px;
}

// IDEA风格的工具栏
.idea-editor-toolbar {
  display: flex;
  align-items: center;
  height: 24px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--separator-color);
  padding: 0 8px;
  gap: 8px;
}

.idea-editor-toolbar-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.idea-editor-toolbar-separator {
  width: 1px;
  height: 16px;
  background-color: var(--separator-color);
  margin: 0 4px;
}